home *** CD-ROM | disk | FTP | other *** search
- /*****************************************************************************
- * Socket communication for IRIT. *
- * *
- * Written by: Gershon Elber Ver 0.1, June 1993. *
- *****************************************************************************/
-
- #ifndef IRIT_SOC_H
- #define IRIT_SOC_H
-
- #include "iritprsr.h"
- #include "allocate.h"
-
- #ifdef OS2GCC
- #define IRIT_PIPE "\\pipe\\irit_os2"
- #define IRIT_PIPE_BUFFER_SIZE 1024
- #endif /* OS2GCC */
-
- /* Prefix that will be sync'ed on before an object will be read from socket. */
- #define SOC_PREFIX_OBJ "iritsocket"
- #define SOC_PREFIX_OBJ_LEN 10
- #define SOC_PREFIX_OBJ_LEN2 20
-
- /* Name of service and default port number. */
- #define IRIT_TCP_SERVICE "irit"
- #define IRIT_TCP_PORT 5432
-
- /* Client routines. */
- int SocClientReadCharNonBlock(void);
- void SocClientUnReadChar(char c);
- char *SocClientReadLineNonBlock(void);
- void SocClientEchoInput(int EchoInput);
- int SocClientCreateSocket(void);
- void SocClientCloseSocket(void);
- IPObjectStruct *SocClientReadOneObject(void);
-
- /* Server routines. */
- void SocServerWriteChar(char c);
- void SocServerWriteLine(char *Line, int LineLen);
- int SocServerCreateSocket(void);
- void SocServerAcceptConnection(void);
- int SocServerActive(void);
- void SocServerCloseSocket(void);
- void SocServerWriteOneObject(IPObjectStruct *PObj);
-
- #endif /* IRIT_SOC_H */
-